package com.woniu.backstage.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.woniu.backstage.dao.TbManagerMapper;
import com.woniu.backstage.entity.TbManager;
import com.woniu.backstage.service.ITbManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author spirit
 * @since 2020-04-15
 */
@Service
public class TbManagerServiceImpl extends ServiceImpl<TbManagerMapper, TbManager> implements ITbManagerService {

    @Autowired
    private TbManagerMapper managerMapper;

    @Override
    public List<TbManager> getManagers() {
        List<TbManager> managers = managerMapper.getManagers();
        if(managers.size() > 0){
            return managers;
        }
        return null;
    }

    @Override
    public TbManager getManager(String username, String password) {
        return managerMapper.getManager(username,password);
    }
}
